Copyright>        OpenRadioss
Copyright>        Copyright (C) 1986-2024 Altair Engineering Inc.
Copyright>
Copyright>        This program is free software: you can redistribute it and/or modify
Copyright>        it under the terms of the GNU Affero General Public License as published by
Copyright>        the Free Software Foundation, either version 3 of the License, or
Copyright>        (at your option) any later version.
Copyright>
Copyright>        This program is distributed in the hope that it will be useful,
Copyright>        but WITHOUT ANY WARRANTY; without even the implied warranty of
Copyright>        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Copyright>        GNU Affero General Public License for more details.
Copyright>
Copyright>        You should have received a copy of the GNU Affero General Public License
Copyright>        along with this program.  If not, see <https://www.gnu.org/licenses/>.
Copyright>
Copyright>
Copyright>        Commercial Alternative: Altair Radioss Software
Copyright>
Copyright>        As an alternative to this open-source version, Altair also offers Altair Radioss
Copyright>        software under a commercial license.  Contact Altair to discuss further if the
Copyright>        commercial version may interest you: https://www.altair.com/radioss/.
Chd|====================================================================
Chd|  WRCOMI                        source/output/restart/wrcomm.F
Chd|-- called by -----------
Chd|        WRRESTP                       source/output/restart/wrrestp.F
Chd|-- calls ---------------
Chd|        WRITE_ARRAY                   ../common_source/comm/write_array.F
Chd|        ALEFVM_MOD                    ../common_source/modules/ale/alefvm_mod.F
Chd|        ALEMUSCL_MOD                  ../common_source/modules/ale/alemuscl_mod.F
Chd|        ALE_MOD                       ../common_source/modules/ale/ale_mod.F
Chd|        ANIM_MOD                      ../common_source/modules/anim_mod.F
Chd|        DAMP_MOD                      share/modules/damp_mod.F      
Chd|        DRAPE_MOD                     share/modules/drape_mod.F     
Chd|        H3D_MOD                       share/modules/h3d_mod.F       
Chd|        INTBUFDEF_MOD                 ../common_source/modules/intbufdef_mod.F
Chd|        LOADS_MOD                     ../common_source/modules/loads/loads_mod.F
Chd|        MULTI_FVM_MOD                 ../common_source/modules/ale/multi_fvm_mod.F
Chd|        OUTMAX_MOD                    ../common_source/modules/outmax_mod.F
Chd|        OUTPUTS_MOD                   ../common_source/modules/outputs_mod.F
Chd|        PARAMETERS_MOD                ../common_source/modules/interfaces/parameters_mod.F
Chd|        PINCHTYPE_MOD                 ../common_source/modules/pinchtype_mod.F
Chd|        SENSOR_MOD                    share/modules/sensor_mod.F    
Chd|        STATE_MOD                     ../common_source/modules/state_mod.F
Chd|====================================================================
      SUBROUTINE WRCOMI(LMXVINT,LVARINT,TABVINT,ISP,MULTI_FVM,H3D_DATA,DYNAIN_DATA,
     .           INTER_PARAMETERS,SENSORS,LOADS)
C-----------------------------------------------
C   M o d u l e s
C-----------------------------------------------
      USE MULTI_FVM_MOD 
      USE H3D_MOD 
      USE PINCHTYPE_MOD
      USE OUTMAX_MOD
      USE ANIM_MOD
      USE OUTPUTS_MOD
      USE LOADS_MOD
      USE DRAPE_MOD
      USE STATE_MOD
      USE INTBUFDEF_MOD
      USE ALEMUSCL_MOD , only:ALEMUSCL_Param
      USE ALEFVM_MOD , only:ALEFVM_Param
      USE ALE_MOD
      USE PARAMETERS_MOD
      USE SENSOR_MOD
      USE DAMP_MOD
C-----------------------------------------------
C   I m p l i c i t   T y p e s
C-----------------------------------------------
#include      "implicit_f.inc"
C-----------------------------------------------
C   D u m m y   A r g u m e n t s
C-----------------------------------------------
      INTEGER LMXVINT,LVARINT,TABVINT(*),ISP
      TYPE(MULTI_FVM_STRUCT) ,INTENT(IN) :: MULTI_FVM
      TYPE(H3D_DATABASE)     ,INTENT(IN) :: H3D_DATA
      TYPE (DYNAIN_DATABASE) ,INTENT(IN) :: DYNAIN_DATA
      TYPE (PARAMETERS_)     ,INTENT(IN) :: INTER_PARAMETERS
      TYPE (SENSORS_)        ,INTENT(IN) :: SENSORS
      TYPE (LOADS_)          ,INTENT(IN) :: LOADS
C-----------------------------------------------
C   C o m m o n   B l o c k s
C-----------------------------------------------
#include      "lagmult.inc"
#include      "com01_c.inc"
#include      "com04_c.inc"
#include      "com09_c.inc"
#include      "com10_c.inc"
#include      "sphcom.inc"
#include      "param_c.inc"
#include      "scr03_c.inc"
#include      "scr05_c.inc"
#include      "scrnoi_c.inc"
#include      "chara_c.inc"
#include      "task_c.inc"
#include      "scr16_c.inc"
#include      "scr14_c.inc"
#include      "scrcut_c.inc"
#include      "scr18_c.inc"
#include      "scr02_c.inc"
#include      "check.inc"
#include      "stati_c.inc"
#include      "scr07_c.inc"
#include      "timeri_c.inc"
#include      "couple_c.inc"
#include      "cong1_c.inc"
#include      "scr17_c.inc"
#include      "rad2r_c.inc"
#include      "warn_c.inc"
#include      "scrfs_c.inc"
#include      "spmd_c.inc"
#include      "fxbcom.inc"
#include      "eigcom.inc"
#include      "flowcom.inc"
#include      "impl1_c.inc"
#include      "tabsiz_c.inc"
#include      "remesh_c.inc"
#include      "com_xfem1.inc"
#include      "sysunit.inc"
#include      "intstamp_c.inc"
#include      "sms_c.inc"
#include      "submodel.inc"
#include      "inter18.inc"
#include      "inter22.inc"
#include      "drape_c.inc"
#include      "ige3d_c.inc"
#include      "thermal_c.inc"
C-----------------------------------------------
C   L o c a l   V a r i a b l e s
C-----------------------------------------------
      INTEGER I,IVAR,IDUM
C--------------------------------------
C     PREPARATION DES VARIABLES ENTIERES POUR ECRITURE SUR RFILE.
C=======================================================================
C-----
      IDUM=0
      DO IVAR=1,LMXVINT
       TABVINT(IVAR)=0
      ENDDO
C-----
      TABVINT(1)  =N2D
      TABVINT(2)  =NCPRI
      TABVINT(3)  =0  ! IUSERWI
      TABVINT(4)  =IALE
      TABVINT(6)  =NCYCLE
      TABVINT(7)  =IRUN
      TABVINT(8)  =IGER
      TABVINT(10) =IRODDL
      TABVINT(11) =IEULER
      TABVINT(12) =ITHERM
      TABVINT(13) =IHSH
      TABVINT(14) =ITESTV
      TABVINT(15) =ITURB
      TABVINT(16) =ILAG
      TABVINT(17) =ISECUT
      TABVINT(18) =IDAMP
      TABVINT(19) =IRXDP
      TABVINT(20) =NMULT
      TABVINT(21) =INTEG8
      TABVINT(22) =ISIGI
      TABVINT(23) =NSPMD
      TABVINT(24) =LENWA
      TABVINT(25) =ISGIFL
      TABVINT(26) =0 !no longer used
      TABVINT(27) =NNODS
      TABVINT(28) =NCNOIS
      TABVINT(29) =LCNE0
      TABVINT(30) =IPARI0
      TABVINT(31) =IMAXIMP
      TABVINT(32) =NNOISER
      TABVINT(33) =NSPGROUP
      TABVINT(34) =IRESMD
      TABVINT(35) =IFRWV
C-----
       TABVINT(5)  =NGROUP
       TABVINT(9)  =LBUFEL
C   -------- Tailles des tableaux entiers --------
      TABVINT(36)  = 0
      TABVINT(37)  = SICODE
      TABVINT(38)  = 0
      TABVINT(39)  = SISKEW
      TABVINT(40)  = SISKWN
      TABVINT(41)  = SIFRAME
      TABVINT(42)  = SNETH
      TABVINT(43)  = SIBCSLAG
      TABVINT(44)  = SIPART
      TABVINT(45)  = SNOM_OPT
      TABVINT(46)  = SNPC
      TABVINT(47)  = 0
      TABVINT(48)  = SIXTG
      TABVINT(49)  = SIXTG1
      TABVINT(50)  = SIXS
      TABVINT(51)  = SIXQ
      TABVINT(52)  = SIXC
      TABVINT(53)  = SIXT
      TABVINT(54)  = SIXP
      TABVINT(55)  = SIXR
      TABVINT(56)  = SITAB
      TABVINT(57)  = SITABM1
      TABVINT(58)  = SGJBUFI
      TABVINT(59)  = ALE%GLOBAL%SNALE
      TABVINT(60)  = ALE%GLOBAL%SIELVS
      TABVINT(62)  = SIFILL
      TABVINT(63)  = SIMS
!! to empty+++
      TABVINT(64)  = SISUBS
      TABVINT(65)  = SIGRN
      TABVINT(66)  = SISURF
      TABVINT(67)  = SISLIN
      TABVINT(68)  = SIBUFSSG
!! to empty---
      TABVINT(69)  = SKXX
      TABVINT(70)  = SIXX
      TABVINT(71)  = SKXSP
      TABVINT(72)  = SIXSP
      TABVINT(73)  = SNOD2SP
      TABVINT(74)  = SISPSYM
      TABVINT(75)  = SISPCOND
      TABVINT(76)  = SISPHIO
      TABVINT(77)  = SLPRTSPH
      TABVINT(78)  = SLONFSPH
      TABVINT(79)  = SIBCL
      TABVINT(80)  = SIBFV
      TABVINT(81)  = SIECRAN
      TABVINT(82)  = SILAS
      TABVINT(83)  = SIEBCS
      TABVINT(84)  = SLACCELM
      TABVINT(85)  = 0
      TABVINT(86)  = SNNLINK
      TABVINT(87)  = SLNLINK
      TABVINT(88)  = 0 !SIUSER
      TABVINT(89)  = SIPARG
      TABVINT(90)  = SDD_IAD
      TABVINT(91)  = SIGRV
      TABVINT(92)  = SLGRAV
      TABVINT(93)  = SIEXLNK
      TABVINT(94)  = SIBVEL
      TABVINT(95)  = SLBVEL
      TABVINT(96)  = SIACTIV
      TABVINT(97)  = SIBMPC
      TABVINT(98)  = SKINET
      TABVINT(99)  = SIPARI
      TABVINT(100) = 0 !SINBUF
      TABVINT(101) = SNPRW
      TABVINT(102) = 0
      TABVINT(103) = SICONX
      TABVINT(104) = SMADPRT
      TABVINT(105) = SMADSH4
      TABVINT(106) = SMADSH3
      TABVINT(107) = SMADSOL
      TABVINT(108) = SMADNOD
      TABVINT(109) = SMADFAIL
      TABVINT(110) = SNPBY
      TABVINT(111) = SNPBYL
      TABVINT(112) = SLPBY
      TABVINT(113) = SLPBYL
      TABVINT(114) = SLRIVET
      TABVINT(115) = SNSTRF
      TABVINT(116) = SLJOINT
      TABVINT(117) = SNODPOR
      TABVINT(118) = SMONVOL
      TABVINT(119) = SLAGBUF
!      TABVINT(120) = SITHGRP obsolete
      TABVINT(121) = SIAD_ELEM
      TABVINT(122) = SIAD_RBY
      TABVINT(123) = SIAD_RBY2
      TABVINT(124) = SIAD_I2M
      TABVINT(125) = SIADCJ
      TABVINT(126) = SIAD_RBM
      TABVINT(127) = SIAD_RBM2
      TABVINT(128) = SIAD_SEC
      TABVINT(129) = SIAD_CUT
      TABVINT(130) = SFR_ELEM
      TABVINT(131) = SFR_RBY
      TABVINT(132) = SFR_WALL
      TABVINT(133) = SFR_RBY2
      TABVINT(134) = SFR_I2M
      TABVINT(135) = SFR_MV
      TABVINT(136) = SFR_LL
      TABVINT(137) = SFR_CJ
      TABVINT(138) = SFR_RBM
      TABVINT(139) = SFR_RBM2
      TABVINT(140) = SFR_SEC
      TABVINT(141) = SFR_CUT
      TABVINT(142) = SRG_CUT
      TABVINT(143) = SFR_MAD
      TABVINT(144) = SFR_I18
      TABVINT(145) = SWEIGHT
      TABVINT(146) = SNEWFRONT
      TABVINT(147) = SNODGLOB
      TABVINT(148) = SNBRCVOIS
      TABVINT(149) = SNBSDVOIS
      TABVINT(150) = SLNRCVOIS
      TABVINT(151) = SLNSDVOIS
      TABVINT(152) = SNERCVOIS
      TABVINT(153) = SNESDVOIS
      TABVINT(154) = SLERCVOIS
      TABVINT(155) = SLESDVOIS
      TABVINT(156) = 0
      TABVINT(157) = 0
      TABVINT(158) = SNPSEGCOM
      TABVINT(159) = SLSEGCOM
      TABVINT(160) = SNPORGEO
      TABVINT(161) = SLNODPOR
C-----
C   tailles des tableau flottant
C
      TABVINT(162) = SX
      TABVINT(163) = SD
      TABVINT(164) = SV
      TABVINT(165) = SVR
      TABVINT(166) = SDR
      TABVINT(167) = STHKE
      TABVINT(168) = SDAMPR
      TABVINT(169) = SDAMP
      TABVINT(170) = SMS
      TABVINT(171) = SIN
      TABVINT(172) = STF
      TABVINT(173) = SPM
      TABVINT(174) = SSKEW
      TABVINT(175) = SXFRAME
      TABVINT(176) = SGEO
      TABVINT(177) = SEANI
      TABVINT(178) = SBUFMAT
      TABVINT(179) = SBUFGEO
      TABVINT(180) = SBUFSF
      TABVINT(181) = SRBMPC
      TABVINT(182) = SGJBUFR
      TABVINT(183) = SW
      TABVINT(184) = SVEUL
      TABVINT(185) = SFILL
      TABVINT(186) = SDFILL
      TABVINT(187) = SALPH
      TABVINT(188) = SWB
      TABVINT(189) = SDSAVE
      TABVINT(191) = SASAVE
      TABVINT(192) = 0 !no longer used
      TABVINT(193) = 0 !no longer used
      TABVINT(194) = 0 !no longer used
      TABVINT(195) = 0 !no longer used
      TABVINT(196) = SSPBUF
      TABVINT(200) = SVSPHIO
      TABVINT(201) = SSPHVELN
      TABVINT(202) = SMSNF
      TABVINT(203) = SFORC
      TABVINT(204) = SVEL
      TABVINT(205) = SFSAV
      TABVINT(206) = SFZERO
      TABVINT(207) = SXLAS
      TABVINT(208) = SREBCS
      TABVINT(209) = SACCELM
      TABVINT(210) = 0
      TABVINT(211) = SFBVEL
      TABVINT(212) = SGRAV
      TABVINT(213) = SFR_WAVE
      TABVINT(214) = SPARTS0
      TABVINT(215) = 0 !SUSER
      TABVINT(216) = SELBUF
      TABVINT(217) = 0 !SBUFIN
      TABVINT(218) = SRWBUF
      TABVINT(219) = SRWSAV
      TABVINT(220) = 0
      TABVINT(221) = SRBY
      TABVINT(222) = SRBYL
      TABVINT(223) = SRIVET
      TABVINT(224) = SSECBUF
      TABVINT(225) = SVOLMON
      TABVINT(226) = SLAMBDA
      TABVINT(227) = SRCONX
      TABVINT(228) = SFASOLFR
      TABVINT(229) = SDD_R2R
      TABVINT(230) = SLPRW
      TABVINT(231) = 0
      TABVINT(232) = SIEXMAD
      TABVINT(233) = SIGEO
      TABVINT(234) = SIPM
      TABVINT(235) = SKIPPON
      TABVINT(236) = SSEGQUADFR
C-----1
      TABVINT(238) = NUMMAT
      TABVINT(239) = NUMNOD
      TABVINT(240) = NUMSKW
      TABVINT(241) = NUMBCS
      TABVINT(242) = NANALY
      TABVINT(243) = NUMELQ
      TABVINT(244) = NUMELS
      TABVINT(245) = NUMELC
      TABVINT(246) = NUMELT
      TABVINT(247) =NUMGEO
      TABVINT(248)=NFUNCT
      TABVINT(249)=NCONLD
      TABVINT(250)=NINVEL
      TABVINT(251)=NLASER
      TABVINT(252)=NINTER
      TABVINT(253)=NRWALL
      TABVINT(254)=NRBODY
      TABVINT(255)=NODMAS
      TABVINT(256)=NFXVEL
      TABVINT(257)=NRIVET
      TABVINT(258)=NUMELR
      TABVINT(259)=NUMELP
      TABVINT(260)=0 !obsolete option removed
      TABVINT(261)=NSECT
      TABVINT(262)=NRBAG
      TABVINT(263)=NJOINT
      TABVINT(264)=ALE%GRID%NWALE
      TABVINT(265)=NUMELTG
      TABVINT(266)=NSLAG
      TABVINT(267)=NFACX
      TABVINT(268)=NUMPOR
      TABVINT(269)=NACCELM
      TABVINT(270)=SENSORS%NSENSOR
      TABVINT(271)=NPRETEN
      TABVINT(272)=NVOLU
      TABVINT(273)=NPART
      TABVINT(274)=NSURF
      TABVINT(275)=NSUBS
      TABVINT(276)=NGRAV
      TABVINT(277)=NRBY2
      TABVINT(278)=NGRNOD
      TABVINT(279)=NGRBRIC
      TABVINT(280)=NGRQUAD
      TABVINT(281)=NGRSHEL
      TABVINT(282)=NGRSH3N
      TABVINT(283)=NGRBEAM
      TABVINT(284)=NGRTRUS
      TABVINT(285)=NGRSPRI
      TABVINT(286)=NLINK
      TABVINT(287)=INVSTR
      TABVINT(288)=NSLIN
      TABVINT(289)=NUMELX
      TABVINT(290)=NCONX
      TABVINT(291)=ISUMNX
      TABVINT(292)=NANIM1D
      TABVINT(293)=NR2RLNK
C-----
      TABVINT(294)=0 !no longer used
      TABVINT(295)=IANIM
      TABVINT(296)=IOUTP
      TABVINT(297)=NHIN2
      TABVINT(298)=IDELI7
C-----2
      TABVINT(299)=NSNOD
      TABVINT(300)=NSELQ
      TABVINT(301)=NSELS
      TABVINT(302)=NSELC
      TABVINT(303)=NSELT
      TABVINT(304)=NSELP
      TABVINT(305)=NSELR
      TABVINT(306)=NSRBY
      TABVINT(307)=NSMAT
      TABVINT(308)=NSELTG
      TABVINT(309)=NTHGRP
      TABVINT(310)=NTHGRP0
      TABVINT(311)=NSELU
C-----
      TABVINT(312)=NPROPM
      TABVINT(313)=NVSIZ
      TABVINT(314)=NPROPG
      TABVINT(315)=NPARG
      TABVINT(316)=LVEUL
      TABVINT(317)=NIXS
      TABVINT(318)=NIXQ
      TABVINT(319)=NIXC
      TABVINT(320)=NIXT
      TABVINT(321)=NIXP
      TABVINT(322)=NIXR
      TABVINT(323)=NIXTG
      TABVINT(324)=0
      TABVINT(325)=NIXFR1
      TABVINT(326)=NIXFR2
      TABVINT(327)=NPARI
      TABVINT(328)=LWAMP
      TABVINT(329)=LWANMP
      TABVINT(330)=NISX
      TABVINT(331)=LIGRN1
      TABVINT(332)=LISUB1
      TABVINT(333)=NIMV
      TABVINT(334)=NNPBY
      TABVINT(335)=NRBY
      TABVINT(336)=NIFV
      TABVINT(337)=NTHVKI
      TABVINT(338)=NPSAV
      TABVINT(339)=NRCNX
      TABVINT(340)=NR2R
      TABVINT(379)=NUMFRAM
      TABVINT(380)=NUMSPH
      TABVINT(381)=NSELSP
      TABVINT(382)=NSPCOND
      TABVINT(384)=NSPHSYM
      TABVINT(385)=MAXPJET
      TABVINT(386)=NISP
      TABVINT(387)=KVOISPH
      TABVINT(388)=NSPBUF
      TABVINT(389)=NISPCOND
      TABVINT(425)=INTBAG
      TABVINT(426)=IBAGSURF
      TABVINT(427)=NRVOLU
      TABVINT(428)=NUMELS10
      TABVINT(429)=NUMELS20
      TABVINT(430)=IDAMPG
      TABVINT(431)=ICLOSE
c      TABVINT(432)=NSENSI
c      TABVINT(433)=NSENSR
      TABVINT(434)=NIBVEL
      TABVINT(435)=LWASPH
      TABVINT(436)=NUMELS16
      TABVINT(437)=NUMELS8
      TABVINT(438)=NRIVF
      TABVINT(439)=NXFRAME
      TABVINT(440)=NSPHIO
      TABVINT(441)=NISPHIO
      TABVINT(442)=LAG_NCF
      TABVINT(443)=LAG_NKF
      TABVINT(444)=LAG_NHF
      TABVINT(445)=LAG_NCL
      TABVINT(446)=LAG_NKL
      TABVINT(447)=LAG_NHL
      TABVINT(448)=NBCSLAG
      TABVINT(449)=LACTIV
      TABVINT(450)=NACTIV
      TABVINT(451)=NDAMP
C-----7
      TABVINT(452)=NICBAG
      TABVINT(453)=NRCBAG
      TABVINT(454)=LICBAG
      TABVINT(455)=LRCBAG
      TABVINT(456)=NIBJET
      TABVINT(457)=NRBJET
      TABVINT(458)=NIBHOL
      TABVINT(459)=NRBHOL
      TABVINT(460)=LIBAGJET
      TABVINT(461)=LRBAGJET
      TABVINT(462)=LIBAGHOL
      TABVINT(463)=LRBAGHOL
      TABVINT(464)=NGJOINT
      TABVINT(465)=NUMMPC
      TABVINT(466)=LVSPHIO
C-----
!      TABVINT(467)= SITHGRPA -- obsolete
!      TABVINT(468)= SITHGRPB
!      TABVINT(469)= SITHGRPC
!      TABVINT(470)= SITHGRPD
!      TABVINT(471)= SITHGRPE
!      TABVINT(472)= SITHGRPF
!      TABVINT(473)= SITHGRPG
!      TABVINT(474)= SITHGRPH
!      TABVINT(475)= SITHGRPI
C
      TABVINT(476)=NTHGRP01(1)
      TABVINT(477)=NTHGRP01(2)
      TABVINT(478)=NTHGRP01(3)
      TABVINT(479)=NTHGRP01(4)
      TABVINT(480)=NTHGRP01(5)
      TABVINT(481)=NTHGRP01(6)
      TABVINT(482)=NTHGRP01(7)
      TABVINT(483)=NTHGRP01(8)
      TABVINT(484)=NTHGRP01(9)
C
      TABVINT(485)=NTHGRP1(1)
      TABVINT(486)=NTHGRP1(2)
      TABVINT(487)=NTHGRP1(3)
      TABVINT(488)=NTHGRP1(4)
      TABVINT(489)=NTHGRP1(5)
      TABVINT(490)=NTHGRP1(6)
      TABVINT(491)=NTHGRP1(7)
      TABVINT(492)=NTHGRP1(8)
      TABVINT(493)=NTHGRP1(9)
      
      LVARINT=493
C-----
      CALL WRITE_ARRAY(OUTP_V , 1, MX_OUTP, TABVINT, LVARINT)
      CALL WRITE_ARRAY(OUTP_SS, 1, MX_OUTP, TABVINT, LVARINT)
      CALL WRITE_ARRAY(OUTP_ST, 1, MX_OUTP, TABVINT, LVARINT)      
      CALL WRITE_ARRAY(OUTP_CS, 1, MX_OUTP, TABVINT, LVARINT)
      CALL WRITE_ARRAY(OUTP_CT, 1, MX_OUTP, TABVINT, LVARINT)      
      CALL WRITE_ARRAY(OUTP_TS, 1, MX_OUTP, TABVINT, LVARINT)
      CALL WRITE_ARRAY(OUTP_PS, 1, MX_OUTP, TABVINT, LVARINT)      
      CALL WRITE_ARRAY(OUTP_PT, 1, MX_OUTP, TABVINT, LVARINT)
      CALL WRITE_ARRAY(OUTP_RS, 1, MX_OUTP, TABVINT, LVARINT)      
      CALL WRITE_ARRAY(OUTP_RT, 1, MX_OUTP, TABVINT, LVARINT)
      CALL WRITE_ARRAY(ANIM_V , 1, MX_ANI , TABVINT, LVARINT)      
      CALL WRITE_ARRAY(ANIM_T , 1, MX_ANI , TABVINT, LVARINT)
      CALL WRITE_ARRAY(ANIM_E , 1, MX_ANI , TABVINT, LVARINT)      
      CALL WRITE_ARRAY(ANIM_CE, 1, MX_ANI , TABVINT, LVARINT)
      CALL WRITE_ARRAY(ANIM_SE, 1, MX_ANI , TABVINT, LVARINT)      
      CALL WRITE_ARRAY(ANIM_FE, 1, MX_ANI , TABVINT, LVARINT)
      CALL WRITE_ARRAY(ANIM_CT, 1, MX_ANI , TABVINT, LVARINT)      
      CALL WRITE_ARRAY(ANIM_ST, 1, MX_ANI , TABVINT, LVARINT)
      CALL WRITE_ARRAY(ANIM_FT, 1, MX_ANI , TABVINT, LVARINT)
C-----
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ANIM_M
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ANIM_K
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ANIM_U
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ANIM_MAT
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NCUTS
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IEPSDOT
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=FMT_ANI
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ANIM_VERS
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IZIP
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NRBYLAG
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NFVLAG
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NNPRW
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NRWLAG
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NHMAX
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LAGMOD
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LAGOPT
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NSEGFLU
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ALE%GLOBAL%NVCONV
C-----
      DO I=1,ALE%GLOBAL%LCONV
        TABVINT(LVARINT+I)=ALE%GLOBAL%CODV(I)
      ENDDO
C-----
      LVARINT=LVARINT+ALE%GLOBAL%LCONV+1
      TABVINT(LVARINT)=NPEBC
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NEBCS
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NRBYKIN
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NBCSKIN
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NUMELS8A
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NUMELTG6
C-----
      DO I=1,12
       TABVINT(LVARINT + I) = IDTMIN(I)
      ENDDO
C-----  chk pt restart
      TABVINT(LVARINT + 13 ) = IDTGR(11)
      TABVINT(LVARINT + 14 ) = NODADT
      TABVINT(LVARINT + 15 ) = NPROC
C No more used      TABVINT(LVARINT + 16 )
      TABVINT(LVARINT + 17 ) = TH_VERS
      TABVINT(LVARINT + 18 ) = ISTATG
      TABVINT(LVARINT + 19 ) = ISTAT
      TABVINT(LVARINT + 20 ) = NTH
      TABVINT(LVARINT + 21 ) = NANIM
      TABVINT(LVARINT + 22 ) = 0
      TABVINT(LVARINT + 23 ) = IMON
      TABVINT(LVARINT + 24 ) = IDUM
      DO I=1,10
        TABVINT(LVARINT + 24 + I) = DEBUG(I)
      ENDDO
      TABVINT(LVARINT + 35 ) = ITRACE
      TABVINT(LVARINT + 36 ) = ALE%GLOBAL%INCOMP
      TABVINT(LVARINT + 37 ) = 0
      TABVINT(LVARINT + 38 ) = ALE%SUB%IALESUB
      TABVINT(LVARINT + 39 ) = IMPL
      TABVINT(LVARINT + 40 ) = NITMX
      TABVINT(LVARINT + 41 ) = ALE%UPWIND%UPWM
      TABVINT(LVARINT + 43 ) = IDDW
      TABVINT(LVARINT + 44 ) = IPREAD
      TABVINT(LVARINT + 45 ) = NSFLSW
      TABVINT(LVARINT + 46 ) = NTFLSW
      TABVINT(LVARINT + 47 ) = 0 !IUSERW
      TABVINT(LVARINT + 48 ) = 0 !NUSERW
      TABVINT(LVARINT + 49 ) = IRAD2R
c noise
      TABVINT(LVARINT + 50 ) =  NNOISE
      TABVINT(LVARINT + 51 ) =  RNOI
      TABVINT(LVARINT + 52 ) =  NOISEV
      TABVINT(LVARINT + 53 ) =  NOISEA
      TABVINT(LVARINT + 54 ) =  NOISEP
c link
      TABVINT(LVARINT + 55 ) =  NRLINK
      TABVINT(LVARINT + 56 ) =  NALELK
      TABVINT(LVARINT + 57 ) =  LLLINK
      !!!TABVINT(LVARINT + 58 ) =  LLINAL
      LVARINT=LVARINT+58
      CALL WRITE_ARRAY(ANIM_N, 1, MX_ANI , TABVINT, LVARINT)
C-----
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IOUTP_FMT
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NPROPGI
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NPROPMI
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NEXMAD
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NMADPRT
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NMADSH4
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NMADSH3
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NMADSOL
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NMADNOD
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ISHFRAM
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NSKYRW0
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NSKYRBK0
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NBDDNOD
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NBDDNRB
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= MULTIMAX
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NBDDI2M
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NISKYI2
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= LCNI2
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= I2NSNT
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NSKYMV0
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NSKYMVC0
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NSKYLL0
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NBDDNCJ
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NBDDNRBM
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NSKYRBM0
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NNODTCUT
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NNODLCUT
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NBDDRBE3M
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NSKYRBE30
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NPARIR
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NUMNODG
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NUMNODM
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NUMELQG
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NUMELCG
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NUMELTGG
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= 0
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NUMELSG
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NUMELPG
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NUMELRG
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NUMELTRG
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NB1DG
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NSKEWAG
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= SECTIOM
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NUMELS16G
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NUM16SHIFT
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= OUTYY_FMT
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NFXBODY
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENNOD
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENMOD
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENGLM
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENCP
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENLM
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENFLS
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENDLS
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENVAR
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENRPM
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENMCD
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENELM
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENSIG
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENGRVI
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENGRVR
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NBIPM
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NSFXBY
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NEIG
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NEIPM
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NERPM
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LEIBUF
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NINTSUB
C--------------------------------------
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IROOTYY
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=INVERS
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NCRST
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IRLTYP
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IRETYP
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=MULTIREST
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IRPREV
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= TRIMAT
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= SPHSHIFT
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NUMSPHG
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NUMELXG
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NITHGR
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NPEBCR
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NBI18
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NSKYI18
C partie commun spmd cfd
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NSVOIS
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NQVOIS
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NTGVOIS
      LVARINT = LVARINT + 1
      TABVINT(LVARINT)= NRCVVOIS
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NSNDVOIS
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NERVOIS
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NESVOIS
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= ILAW11
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NSEGCOM
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NUMPORL
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= ALE%GLOBAL%ICAA
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= ISPHBUC
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NRDAMP
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NSPROC
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NDSOLV
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NSBMAX
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NSVMAXT
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NSMOD
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NFLOW
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LIFLOW
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LRFLOW
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NIFLOW
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NIIOFLOW
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NRFLOW
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NRIOFLOW
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ICONDP
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IMPL_S0
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NFASOLFR
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NSEGQUADFR
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SFR_LAGF
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SLLAGF
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NVENTTOT
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NUMELC0
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NUMELTG0
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NUMNOD0
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NADMESH
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LEVELMAX
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IADMRULE
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=KSH4TREE
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=KSH3TREE
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=KPADMESH
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=KCONTACT
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=KIPADMESH
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SICONTACT
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SRCONTACT
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SISKWP
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SNSKWP
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SISENSP
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SNSENSP
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SIACCP
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SNACCP
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IISROTS
C
C .sta files
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=MX_STAT
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ISTATF
      DO I=1, MX_STAT
       LVARINT=LVARINT+1
       TABVINT(LVARINT)=STAT_C(I)
      ENDDO
C
C .dynain files
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=DYNAIN_DATA%IDYNAINF
      DO I=1, DYNAIN_DATA%MX_DYNAIN
       LVARINT=LVARINT+1
       TABVINT(LVARINT)=DYNAIN_DATA%DYNAIN_C(I)
      ENDDO
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=DYNAIN_DATA%DYNAIN_CHECK
C  heat transfer + int7
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = INTHEAT
C  xfem
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NUMELCRK
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NLEVSET
C---------------------------------------
C  heat transfer
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = ITHERM_FE
C     Static condensation
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = ISTATCND_SAV
C Defense Lic Flag
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LIDFS
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LIRNUR
C Unit info
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LUNIT
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NUNIT0
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NUNITS
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LSH4TRIM
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LSH3TRIM
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IADMERRT
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IMPOSE_DR
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NINTSTAMP
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=INTER_ITHKNOD !defined in interface module (common_source directory)
C
C  rigid material
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= IRIGID_MAT
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NRBYM
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NGSLNRBYM
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= NFRBYM
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=  NIRBYM
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=  NSKYRBMK0
C-----------
C C thermal bc
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=  NIFT
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=  NICONV
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=  LFACTHER
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=  NUMCONV
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=  NFXTEMP
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=  ISTAMPING
C-----RBE3
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NRBE3
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SIRBE3
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SLRBE3
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SFRBE3
C   ----for spmd SIAD_RBE3M,SFR_RBE3M-----
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SIAD_RBE3M
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SFR_RBE3M
C-------------------------------------------------------------------
C    spmd rigid material
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=  SFR_RBYM
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=  SFR_RBYM2
C Tableaux Noise
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = SINOISE
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = SFNOISE
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NNOISE_SAV
C shell ply xfem for composite
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = IPLYXFEM
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NPLYMAX
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = IPLYBCS
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NPLYXFE
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = EPLYXFE
C--------------------------------------
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NGRPART
C--------------------------------------
C Madymo array
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = SMADIDX
C--------------------------------------
C Madcl nodes
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=MADCLNODS
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = IDTMINS
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = IDTGRS
C--------------------------------------
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = IREAC
C--------------------------------------
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = SNOM_SECT
C--------------------------------------
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = IGRELEM
C--------------------------------------
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NTHPART
C--------------------------------------
C ecriture sur restart de tableaux de masse elementaires
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IREST_MSELT
C--------------------------------------
C ecriture sur restart nthread
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NTHREAD
C   ----for output of rotational dof -----
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IDROT
C radiative flux
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=  NIRADIA
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=  NUMRADIA
C imposed heat flux
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=  NITFLUX
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=  NFXFLUX
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=  NSMSPCG
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=  NTABLE
C-----RBE2
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NBDDNRBE2
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NRBE2
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SIRBE2
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SLRBE2
C   ----for spmd SIAD_RBE2,SFR_RBE2-----
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SIAD_RBE2
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SFR_RBE2
C   ----add hierarchy for both smp spmd----
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NHRBE2
C --- simplified ale option + lagrange
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = IALELAG
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NRBE2G
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NRBE3G
C
C----------------------------------
C ... shell 4-N  + shell 3-N (X-FEM)
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ICRACK3D
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LCNEPXFEM
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SITHVAR
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NPLYNODG
C --- Need NXREF Option for Modif files / SPMD
      LVARINT=LVARINT+1
      TABVINT(LVARINT)  = NXREF
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = IDTMINS_INT
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SLCFIELD
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NLOAD
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IDAMP_RDOF
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LSKEW
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LISKN
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LFXVELR
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NLOADC
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SLLOADP
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NLOADP
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NLOADP_HYD
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NINTLOADP
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NINTLOADP21
C xfem for layered shell (cracks)
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LCNECRKXFEM
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NCRKXFE
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ECRKXFE
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NLEVMAX
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NCRKNODG
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IENRNOD
      LVARINT=LVARINT+1
c Inlet outlet spmd, new tab ibufssg_io
      TABVINT(LVARINT)=SIBUFSSG_IO
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NIBSPH
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SLINALE
      LVARINT=LVARINT+1      
      TABVINT(LVARINT)=NSUBMOD
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= ALE%GLOBAL%NALENOVS
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LNOPT1
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LILSET1
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LISLIN1
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LTITR
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LISURF1
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LIPART1
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= SIZFIELD
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= SIZLOADP
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= I2NSN25
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LVOISPH
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ANIM_PLY
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SIBORDNODE
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SIEDGESH
C multilayer xfem shell
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ECRKXFEC
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ECRKXFETG
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NUMEDGES
C inter22
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=INT22
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=I22_ALEUL
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NSUB22
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IOUTP22      
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=I22LAW37 
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=I22LAW51      
c
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= ICRASH
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = SIAD_EDGE
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = SFR_EDGE
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = SFR_NBEDGE
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NBGAUGE
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = LLACCELM
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = LLGAUGE
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = SIGAUP
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = SNGAUP
C      
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= SDD_R2R_ELEM
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= R2R_SIU 
C heat trasfert for interface Type21 : main temperature is variable
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = FTEMPVAR21
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NUMNODXFE
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = SNODGLOBXFE
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NSPHSOL
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = FIRST_SPHSOL
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = IDDOM
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NUMMAT0 
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NUMGEO0                   
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = INTPLYXFEM
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = I22LEN     
c
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NCLUSTER
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NXLAYMAX
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SRTHBUF
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NUMELIG3D                 
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = SKXIG3D           
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = SIXIG3D          
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = SKNOT
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = SKNOTLOCPC
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = SKNOTLOCEL
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NUMFAKENODIGEO
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = DEG_MAX
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NXEL
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NFILSOL
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = SENSORS%SFSAV
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = SENSORS%STABSEN
C Stack info
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IPART_STACK 
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NPT_STACK      
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NS_STACK      
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ALEFVM_Param%IEnabled
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ALEFVM_Param%ISOLVER 
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ALEMUSCL_Param%IALEMUSCL
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ALEMUSCL_Param%BETA
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ALEMUSCL_Param%I_LAW

C ITETRA=3
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ISFEM            
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NLOADP_F      
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NLOADP_B      
C /LOAD/PCYL
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = LOADS%NLOAD_CYL
C      
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = IDTMIN(51)
C     /DT/FVMBAG
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = IDTMIN(52)
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NBR_GPMP
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=TAILLE
C      
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NINTER25
C      
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NUMNOR
C      
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NBDDNORT   
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NBDDNOR_MAX 
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NBCCFR25   
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NBCCNOR    
C      
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NBDDEDGT   
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NBDDEDG_MAX 
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NSNT25     
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NRTMX25     
C drape option
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NDRAPE
C Element activation
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = LRACTIV
C ID_PLY -> animation file
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NUMPLY
C ID_PLY -> animation file
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NUMSTACK
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=TABMP_L
C
C SOL2SPH flag
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SOL2SPH_FLAG
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ITSOL2SPH 
C ISFINT flag
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ALE%GLOBAL%ISFINT 
C ICNDS10 dyna condensation for S10
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NS10E 
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LCNCND 
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SIAD_CNDM 
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SFR_CNDM 
C---- old local sys of shell3n      
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ISH3NFRAM
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=STAB_MAT
C SMS auto switch
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ISMS_SELEC
      LVARINT = LVARINT + 1
      TABVINT(LVARINT) = 0
      IF (MULTI_FVM%IS_USED) TABVINT(LVARINT) = 1
      LVARINT = LVARINT + 1
      TABVINT(LVARINT) = 0
      IF (MULTI_FVM%IS_USED) TABVINT(LVARINT) = MULTI_FVM%NBMAT
C---- old Is17      
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IS17_OLD
C IH3D -> H3D count     
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=H3D_DATA%IH3D
C    
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NUMELS10G
C  
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NUMELS20G
c
      LVARINT=LVARINT+1
      TABVINT(LVARINT)= ALE%GLOBAL%I_DT_NODA_ALE_ON
      
C Interface Adhesion
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = INTERADHESION          
c
C Friction interface  
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NINTERFRIC 
!
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENSUBS
!
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENIGRNOD
!
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENIGRBRIC
!
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENIGRQUAD
!
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENIGRSH4N
!
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENIGRSH3N
!
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENIGRTRUS
!
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENIGRBEAM
!
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENIGRSPRI
!
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENIGRPART
!
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENISURF
!
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LENISLIN

      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IDTS6

      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IDT1SOL

      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IDT1TET10

      LVARINT=LVARINT+1
      TABVINT(LVARINT)=IDT1SH

!     H3D -> number of skid lines    
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=H3D_DATA%N_SCAL_SKID
!     H3D ANIM-> Is maximum contact force/contact pressure computed   
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = IFCONTMAX
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = IFCONTPMAX
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = IFCONT2MAX
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = IFCONTP2MAX
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = IFCONT2MIN
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = IFCONTP2MIN
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = S_EFRIC
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = S_EFRICINT
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = S_EFRICG
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = S_EFRICINTG
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NINEFRIC
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NINEFRIC_STAMP
C  NITSCHE METHOD
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NITSCHE
C  pinching
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NPINCH
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NPLOADPINCH
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = ALE%UPWIND%I_SUPG_ON_OFF      

      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NLEDGE      
!
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=INISPRI
!
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SENSORS%NSTOP
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SENSORS%NSTAT
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SENSORS%NOUTP
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SENSORS%NANIM
!
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NIBCLD
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LFACCLD
!
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NIGRV
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LFACGRV
C  BCS/CYCLIC
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NBCSCYC
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SIBCSCYC
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=SLBCSCYC

      LVARINT=LVARINT+1
      TABVINT(LVARINT)=INTER18_AUTOPARAM
      LVARINT=LVARINT+1
      IF(INTER18_IS_VARIABLE_GAP_DEFINED) THEN
        TABVINT(LVARINT) = 1
      ELSE
        TABVINT(LVARINT) = 0
      ENDIF


      IF ((IALE > 0 .AND. ALE%GRID%NWALE == 6) .OR. INTER18_AUTOPARAM == 1 .OR. INTER18_IS_VARIABLE_GAP_DEFINED) THEN
         LVARINT = LVARINT + 1
         TABVINT(LVARINT) = NE_SLERCVOIS
         LVARINT = LVARINT + 1
         TABVINT(LVARINT) = NE_SLESDVOIS
         LVARINT = LVARINT + 1
         TABVINT(LVARINT) = NE_NSVOIS
         LVARINT = LVARINT + 1
         TABVINT(LVARINT) = NE_NQVOIS
         LVARINT = LVARINT + 1
         TABVINT(LVARINT) = NE_NTGVOIS
      ENDIF
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=PDEL
C-----Seatbelts - slipring / retractors
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NSLIPRING
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NRETRACTOR
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NSLIPRING_G
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NRETRACTOR_G
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=N_ANCHOR_REMOTE
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=N_ANCHOR_REMOTE_SEND
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=N_SEATBELT
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=N_SEATBELT_2D
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LASTANIMCYCLE

      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LASTH3DCYCLE

      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LASTDYNCYCLE

      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LASTSTATCYCLE

C
C---- Starter input version
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=ST_INVERS
C
C---- Number of RBODY before merge
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=NRBODY0
C---- MAX (/H3D) 
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LMAX_DIS
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LMAX_VEL
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LMAX_NSIG
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=LMAX_NSTRA
C---- Time history strain flag
      LVARINT=LVARINT+1
      TABVINT(LVARINT)=TH_STRAIN
C  draped shell element
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NUMELC_DRAPE
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NUMELTG_DRAPE     
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = INTER_PARAMETERS%ISTIF_DT  
C
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = INTER_PARAMETERS%INTCAREA 
C
C /LOAD/CLOAD
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = LOADS%NLOAD_CLOAD
C /LOAD/PLOAD
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = LOADS%NLOAD_PLOAD
C-----/DAMP/VREL
      LVARINT=LVARINT+1
      TABVINT(LVARINT) = NDAMP_VREL      
C----------------------------------------------------------------
C    warning to radioss developers : Check LVARINT < LMXVINT
C----------------------------------------------------------------
      IF (LVARINT > LMXVINT)STOP 123
c-----------
      RETURN
      END
Chd|====================================================================
Chd|  WRCOMR                        source/output/restart/wrcomm.F
Chd|-- called by -----------
Chd|        WRRESTP                       source/output/restart/wrrestp.F
Chd|-- calls ---------------
Chd|        ALE_MOD                       ../common_source/modules/ale/ale_mod.F
Chd|        ANIM_MOD                      ../common_source/modules/anim_mod.F
Chd|        OUTPUTS_MOD                   ../common_source/modules/outputs_mod.F
Chd|        OUTPUT_MOD                    ../common_source/modules/output/output_mod.F
Chd|        PARAMETERS_MOD                ../common_source/modules/interfaces/parameters_mod.F
Chd|        STATE_MOD                     ../common_source/modules/state_mod.F
Chd|====================================================================
      SUBROUTINE WRCOMR(LMXVREA,LVARREA,TABVREA,DYNAIN_DATA,INTER_PARAMETERS,
     .                  OUTPUT)
C-----------------------------------------------
C   M o d u l e s
C-----------------------------------------------
      USE ANIM_MOD
      USE OUTPUTS_MOD
      USE STATE_MOD
      USE ALE_MOD
      USE PARAMETERS_MOD
      USE OUTPUT_MOD
C-----------------------------------------------
C   I m p l i c i t   T y p e s
C-----------------------------------------------
#include      "implicit_f.inc"
C-----------------------------------------------
C   D u m m y   A r g u m e n t s
C-----------------------------------------------
      INTEGER LMXVREA,LVARREA, I
      my_real TABVREA(*)
      TYPE (DYNAIN_DATABASE), INTENT(IN) :: DYNAIN_DATA
      TYPE (PARAMETERS_) ,INTENT(IN):: INTER_PARAMETERS
      TYPE(OUTPUT_), INTENT(INOUT) :: OUTPUT !< output structure
C-----------------------------------------------
C   C o m m o n   B l o c k s
C-----------------------------------------------
#include      "com06_c.inc"
#include      "com08_c.inc"
#include      "cong2_c.inc"
#include      "couple_c.inc"
#include      "lagmult.inc"
#include      "remesh_c.inc"
#include      "sphcom.inc"
#include      "scr06_c.inc"
#include      "scr11_c.inc"
#include      "scr18_c.inc"
#include      "scr19_c.inc"
#include      "scrnoi_c.inc"
#include      "sms_c.inc"
#include      "statr_c.inc"
#include      "sysunit.inc"
#include      "inter22.inc"
#include      "mmale51_c.inc"
#include      "thermal_c.inc"
#include      "itet2_c.inc"
C-----------------------------------------------
#include      "ddspmd_c.inc"
C-----------------------------------------------
C   L o c a l   V a r i a b l e s
C-----------------------------------------------
      INTEGER IVAR,RVARINT,J
C--------------------------------------
C     REAL VARIABLES TO BE WRITTEN IN RFILE
C=======================================================================
      DO IVAR=1,LMXVREA
       TABVREA(IVAR)=ZERO
      ENDDO
C-----
      TABVREA(1)=TT
      TABVREA(2)=DT1
      TABVREA(3)=DT2
      TABVREA(4)=DT12
      TABVREA(5)=DT2OLD
      TABVREA(6)=TSTOP
      TABVREA(7)=0 !no longer used
      TABVREA(8)=OUTPUT%TH%THIS
C-----
      TABVREA(9)=0 !no longer used
      TABVREA(10)=OUTPUT%TH%DTHIS
      TABVREA(11)=DTFAC
      TABVREA(12)=DTMIN
      TABVREA(13)=VOLMIN
      TABVREA(14)=TFEXT
      TABVREA(15)=REINT
      TABVREA(16)=0 !no longer used
      TABVREA(17)=0 !no longer used
      TABVREA(18)=DTANIM
      TABVREA(19)=TANIM
      TABVREA(20)=UREINT
      TABVREA(21)=ECONTV
      TABVREA(22)=EHOUR
      TABVREA(23)=DTOUTP
      TABVREA(24)=TOUTP
      TABVREA(25)=T1S
      TABVREA(26)=DT2S
      TABVREA(27)=EPOR
      !unused TABVREA(28)=USREINT
      TABVREA(29)=R2RFX1
      TABVREA(30)=R2RFX2
      TABVREA(31)=DAMPA
      TABVREA(32)=DAMPB
      TABVREA(33)=DAMPW
C-----
      TABVREA(34)=ALE%GRID%ALPHA
      TABVREA(35)=ALE%GRID%GAMMA
      TABVREA(36)=ALE%GRID%VGX
      TABVREA(37)=ALE%GRID%VGY
      TABVREA(38)=ALE%GRID%VGZ
C-----
C      SPAOLD is not written into Rfile.
      TABVREA(39)=SPASORT
      TABVREA(40)=SPATRUE
      DO I=1,9
        TABVREA(40+I) = OUTPUT%TH%DTHIS1(I)
        TABVREA(49+I) = OUTPUT%TH%THIS1(I)
      ENDDO
      TABVREA(59) = MASS0
      TABVREA(60) = ENTOT0
      LVARREA=60
      TABVREA(61)=LAGM_TOL
      TABVREA(62)=LAG_ALPH
      TABVREA(63)=LAG_ALPHS
      DO I=1,12
        TABVREA(63 + I)     = DTFAC1(I)
        TABVREA(63 + 12 +I) = DTMIN1(I)
      ENDDO
      TABVREA(88)  = BETA
      TABVREA(89)  = BETATE
      TABVREA(90)  = PERIOD
      TABVREA(91)  = DMTMXS
      TABVREA(92)  = DMNMXS
      TABVREA(93)  = DMNMXS
      TABVREA(94)  = DTIN               
      TABVREA(95)  = DTMX               
      TABVREA(96)  = MADUL              
      TABVREA(97)  = MADUT              
      TABVREA(98)  = MADUM              
      TABVREA(99)  = ALE%SUB%DTFSUB
      TABVREA(100) = ALE%SUB%DTMSUB
      TABVREA(101) = EPS                
      TABVREA(102) = EPS2               
      TABVREA(103) = ALE%UPWIND%CUPWM  
Cnoise
      TABVREA(104) = TNOISE
      TABVREA(105) = DTNOISE
      TABVREA(106)=DWMAD
      LVARREA=106
      TABVREA(107)=FAC_MASS
      TABVREA(108)=FAC_LENGTH
      TABVREA(109)=FAC_TIME
      TABVREA(110)=T1SH
      TABVREA(111) = ALE%UPWIND%UPWSM
      RVARINT = 111
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = TPSREF
C THERMAL ANALYSIS
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = HEAT_STORED
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = HEAT_MECA
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = HEAT_CONV
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = HEAT_RADIA
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = HEAT_FFLUX
C   TABLEAU SOL1TNL
      DO I=0, MAXLAW
        RVARINT = RVARINT + 1
        TABVREA(RVARINT) = SOL1TNL(I,1)
        RVARINT = RVARINT + 1
        TABVREA(RVARINT) = SOL1TNL(I,2)
      ENDDO
C   TABLEAU SOL8TNL
      DO I=0, MAXLAW
        RVARINT = RVARINT + 1
        TABVREA(RVARINT) = SOL8TNL(I,1)
        RVARINT = RVARINT + 1
        TABVREA(RVARINT) = SOL8TNL(I,2)
      ENDDO
      DO I=0, MAXLAW
        RVARINT = RVARINT + 1
        TABVREA(RVARINT) = TET10TNL(I,1)
      ENDDO
      DO I=0, MAXLAW
        RVARINT = RVARINT + 1
        TABVREA(RVARINT) = TET10TNL(I,1)
      ENDDO
C   TABLEAU SHTNL
      DO I=0, MAXLAW
        DO J=0,3
          RVARINT = RVARINT + 1
          TABVREA(RVARINT) = SHTNL(I,J,1)
          RVARINT = RVARINT + 1
          TABVREA(RVARINT) = SHTNL(I,J,2)
          RVARINT = RVARINT + 1
          TABVREA(RVARINT) = SHTNL(I,J,3)
        ENDDO
      ENDDO
C   TABLEAU TRITNL
      DO I=0, MAXLAW
        DO J=0,3
          RVARINT = RVARINT + 1
          TABVREA(RVARINT) = TRITNL(I,J,1)
          RVARINT = RVARINT + 1
          TABVREA(RVARINT) = TRITNL(I,J,2)
          RVARINT = RVARINT + 1
          TABVREA(RVARINT) = TRITNL(I,J,3)
        ENDDO
      ENDDO
C   TABLEAU SOLTELT
      DO I=1,8
        RVARINT = RVARINT + 1
        TABVREA(RVARINT) = SOLTELT(I)
      ENDDO
        RVARINT = RVARINT + 1
        TABVREA(RVARINT) = TET4TELT(1)
        RVARINT = RVARINT + 1
        TABVREA(RVARINT) = TET10TELT(1)
C   TABLEAU SHTELT
      DO I=1,10
        RVARINT = RVARINT + 1
        TABVREA(RVARINT) = SHTELT(I)
      ENDDO
C   TABLEAU TRITELT
      DO I=1,10
        RVARINT = RVARINT + 1
        TABVREA(RVARINT) = TRITELT(I)
      ENDDO
C
C .sta files
      RVARINT = RVARINT + 1
      TABVREA(RVARINT)=DTSTAT
      RVARINT = RVARINT + 1
      TABVREA(RVARINT)=TSTAT
C .dynain files
      RVARINT = RVARINT + 1
      TABVREA(RVARINT)=DYNAIN_DATA%DTDYNAIN
      RVARINT = RVARINT + 1
      TABVREA(RVARINT)=DYNAIN_DATA%TDYNAIN
C
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = TADMESH
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = DTADMESH
C
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = DTFACS
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = DTMINS
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = TOL_SMS
C abf files
      DO I=1,10
        RVARINT = RVARINT + 1
        TABVREA(RVARINT) = TABFIS(I)
        RVARINT = RVARINT + 1
        TABVREA(RVARINT) = DTABF(I)
        RVARINT = RVARINT + 1
        TABVREA(RVARINT) = DTABFWR(I)
        RVARINT = RVARINT + 1
        TABVREA(RVARINT) = TABFWR(I)
      ENDDO
 
C
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = RATIO22 
C
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = M51_IFLG6
C
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = MS_ND
C
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = DMSI2
C
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = MSI20
C      
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = DTFAC1(51)
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = DTMIN1(51) 
C     /DT/FVMBAG
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = DTFAC1(52)
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = DTMIN1(52) 
C
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = DTFAC1(102)
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = DTMIN1(102)          
C
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = DTFACS_INT
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = DTMINS_INT         
C
C    BETATE_0, EINT_0,ENCIN_0,PIMAX ,PCMAX,PINT ,PCIN  
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = BETATE 
      RVARINT  = RVARINT + 1
      TABVREA(RVARINT) = EINT_0   
      RVARINT  = RVARINT + 1
      TABVREA(RVARINT) = ENCIN_0  
      RVARINT  = RVARINT + 1
      TABVREA(RVARINT) = PIMAX    
      RVARINT  = RVARINT + 1
      TABVREA(RVARINT) = PCMAX    
      RVARINT  = RVARINT + 1
      TABVREA(RVARINT) = PINT     
      RVARINT  = RVARINT + 1
      TABVREA(RVARINT) = PCIN   
      RVARINT  = RVARINT + 1
      TABVREA(RVARINT:RVARINT+3) = FIL_IE(1:4)   
      RVARINT  = RVARINT + 4
      TABVREA(RVARINT:RVARINT+3) = FIL_KE(1:4)   
      RVARINT  = RVARINT + 4
      TABVREA(RVARINT) = NFIRST   
C
      RVARINT  = RVARINT + 1
      TABVREA(RVARINT) = ALE%GRID%VGY0            
      RVARINT  = RVARINT + 1
      TABVREA(RVARINT) = ALE%GRID%VGZ0
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = ECONTD 
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = ECONT_CUMU
C
C  INITIAL MASS IN STARTER
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = MASS0_START
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = PERCENT_ADDMASS_OLD
      
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = TANIM_STOP      
      
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = XI_RES  
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = YI_RES  
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = ZI_RES
C
      RVARINT = RVARINT + 1
      TABVREA(RVARINT) = INTER_PARAMETERS%DT_STIFINT         
C      
      LVARREA =RVARINT
C----------------------------------------------------------------
C    warning to radioss developers : Check LVARREA < LMXVREA
C--------------------------------------
      RETURN
      END
